package com.yilin.tms.core.entity.system.applets;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "sys_h5_applets")
@TableName("sys_h5_applets")
public class H5Applets extends BaseEntity {

    //办公/社交/生活/摄影美图/音视频/新闻/娱乐/购物/旅行/金融
    public enum AppletClassify {
        office(0, "办公"), social(1, "社交"), life(2, "生活"), photography(3, "摄影美图"),
        audioAndVideo(4, "音视频"), news(5, "新闻"), play(6, "娱乐"), shopping(7, "购物"),
        travel(8, "旅行"), finance(9, "金融");
        @EnumValue
        public Integer index;
        public String name;

        AppletClassify(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum AppletStatus{
        save(0,"已添加"),
        verify(1,"审核中"),
        online(2,"已上线"),
        offline(1,"已下线");
        @EnumValue
        public Integer index;
        public String name;

        AppletStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "name")
    private String name;//APP名称/标题
    @Column(name = "link_url")
    private String linkUrl;//链接地址
    @Column(name = "icon_url")
    private String iconUrl;//图标地址

    @Column(name = "app_id")
    private String appId;//appId: 新增 唯一标识，短 英文+数字， 8/16 位
    @Column(name = "applet_classify")
    private AppletClassify appletClassify;//分类
    @Column(name = "applet_status")
    private AppletStatus appletStatus;//状态

    @Column(name = "operator")
    private String operator;//运营方运营方
    @Column(name = "version_no")
    private String versionNo;//版本号 1.0.0
    @Column(name = "frame")
    private String frame;//框架说明
    @Column(name = "app_sort")
    private Integer appSort=99999;//排序

    @Column(name = "title_bar_bg_color")
    private String titleBarBgColor;//标题背景色
    @Column(name = "title_bar_front_color")
    private String titleBarFrontColor;//前景色
    @Column(name = "whether_status_bar")
    private Boolean whetherStatusBar;//是否显示状态栏
    @Column(name = "whether_title_bar")
    private Boolean whetherTitleBar;//是否显示标题栏
    @Column(name = "horizontal_screen")
    private Boolean horizontalScreen;//是否横屏运行

    @TableLogic
    @Column(name = "is_deleted", columnDefinition = "INT default 0")
    private Integer isDeleted;//逻辑删除

    public Integer getAppSort() {
        return appSort;
    }

    public void setAppSort(Integer appSort) {
        this.appSort = appSort;
    }

    public Boolean getHorizontalScreen() {
        return horizontalScreen;
    }

    public void setHorizontalScreen(Boolean horizontalScreen) {
        this.horizontalScreen = horizontalScreen;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public AppletStatus getAppletStatus() {
        return appletStatus;
    }

    public void setAppletStatus(AppletStatus appletStatus) {
        this.appletStatus = appletStatus;
    }

    public AppletClassify getAppletClassify() {
        return appletClassify;
    }

    public void setAppletClassify(AppletClassify appletClassify) {
        this.appletClassify = appletClassify;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getVersionNo() {
        return versionNo;
    }

    public void setVersionNo(String versionNo) {
        this.versionNo = versionNo;
    }

    public String getFrame() {
        return frame;
    }

    public void setFrame(String frame) {
        this.frame = frame;
    }

    public String getTitleBarBgColor() {
        return titleBarBgColor;
    }

    public void setTitleBarBgColor(String titleBarBgColor) {
        this.titleBarBgColor = titleBarBgColor;
    }

    public String getTitleBarFrontColor() {
        return titleBarFrontColor;
    }

    public void setTitleBarFrontColor(String titleBarFrontColor) {
        this.titleBarFrontColor = titleBarFrontColor;
    }

    public Boolean getWhetherStatusBar() {
        return whetherStatusBar;
    }

    public void setWhetherStatusBar(Boolean whetherStatusBar) {
        this.whetherStatusBar = whetherStatusBar;
    }

    public Boolean getWhetherTitleBar() {
        return whetherTitleBar;
    }

    public void setWhetherTitleBar(Boolean whetherTitleBar) {
        this.whetherTitleBar = whetherTitleBar;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }
}
